3D Graphics Programming with QuickDraw 3D 1.5.4
Previous | QD3D Book | Overview | Chapter Contents | Next |
QuickDraw 3D provides routines that you can use to get information about the characteristics of a texture. You can get the dimensions of a texture, as well as the number of channels and the number of bits per channel. You cannot, however, reset any of these texture characteristics (they are determined at the time you create a texture object). You can also get the current alpha and RGB channels of a texture. You can reset these characteristics to achieve special effects.
To create a texture object, you need to create an instance of some subclass of the texture class. For example, you can create a pixmap texture object by calling Q3PixmapTexture_New . See "Managing Pixmap Textures" for information on creating and manipulating pixmap textures.
You can use the Q3Texture_GetType function to get the type of a texture object.
TQ3ObjectType Q3Texture_GetType (TQ3TextureObject texture);
The Q3Texture_GetType function returns, as its function result, the type of the texture object specified by the texture parameter. The type of texture objects currently supported by QuickDraw 3D is defined by these constants:
kQ3TextureTypePixmap
kQ3TextureTypeMipmap
If the specified texture object is invalid or is not of this type, Q3Texture_GetType returns the value kQ3ObjectTypeInvalid .
You can use the Q3Texture_GetWidth function to get the width of a texture.
TQ3Status Q3Texture_GetWidth (
TQ3TextureObject texture,
unsigned long *width);
You can use the Q3Texture_GetHeight function to get the height of a texture.
TQ3Status Q3Texture_GetHeight (
TQ3TextureObject texture,
unsigned long *height);
Previous | QD3D Book | Overview | Chapter Contents | Next |